<?php
require dirname(__FILE__) . DIRECTORY_SEPARATOR . 'autoload.php';

use payClass\Datebase;
use payClass\pay\Config;

$db     = new Datebase();
$config = new Config();

// $param  = $db->param();
$param = [
    'order'          =>  time().uniqid(),
    'amount'         =>  '0.10',
    'account_Name'   =>  '赵忠意',
    'account_Number' =>  '6217003380009745164',
    'bank_Code'      =>  'CCB',
];

// $verifyRes = $db->verifyDraw($param);
// if ($verifyRes != 1) exit($verifyRes);

$result = Config::payTest($param);
print_r($result);die;
if($result["result"] != "success") exit($result["msg"]);

//代付查询
$result = Config::payQueryTest();
if($result["result"] != "success") exit($result["msg"]);

if ($result["sett_status"] != 'success') {
    exit($result["sett_status"]);
} else {
    echo 1;
}